package org.example.casemodule.enums;

public enum NotificationType {
    //"ASSIGN","ACCEPT","PROGRESS","STATUS"
    ASSIGN("ASSIGN", "分配"),
    ACCEPT("ACCEPT", "接受"),
    PROGRESS("PROGRESS", "进行中"),
    STATUS("STATUS", "状态变更");

    private final String code;
    private final String info;

    NotificationType(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static NotificationType getByCode(String code) {
        for (NotificationType type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }

    public static String getInfoByCode(String code) {
        for (NotificationType type : values()) {
            if (type.getCode().equals(code)) {
                return type.getInfo();
            }
        }
        return null;
    }
}
